package com.yayan.beautyclub.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.yayan.beautyclub.bean.Reserve;

public interface IReserveDao {

	/**
	 * 根据uId获取用户预约信息
	 * @param uId
	 * @param status
	 * @param page
	 * @param size
	 * @return
	 * @throws Exception
	 */
	List<Map<String, Object>> findReserveByUserId(long uId, int status, int page, int size) throws Exception;
	
	/**
	 * 根据条件读取用户预约信息列表（后台管理员）
	 * @param start
	 * @param end
	 * @param cId
	 * @param searchKey
	 * @return
	 * @throws Exception
	 */
	List<Map<String, Object>> findReserveByCondition(int page,int size, int firstcId, int secondcId, String searchKey) throws Exception;
	
	/**
	 * 根据rId获取预约项目具体信息
	 * @param rId
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> findReserveById(long rId) throws Exception;
	
	/**
	 * 保存预约信息
	 * @param reserve
	 * @return
	 * @throws Exception
	 */
	long save(Reserve reserve) throws Exception;
	
	/**
	 * 根据rId删除预约信息(逻辑删除)
	 * @param rId
	 * @return
	 * @throws Exception
	 */
	boolean cancel(long rId) throws Exception;
	
	/**
	 * 根据rId删除预约信息(物理删除)
	 * @param rId
	 * @return
	 * @throws Exception
	 */
	boolean delete(long rId) throws Exception;
}
